package com.laowang.project.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import com.laowang.framework.web.domain.PageObject;
import com.laowang.project.system.domain.vo.OrderObject;
import com.laowang.project.system.domain.vo.PayObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * order对象对象 wx_order
 *
 * @author laowang
 * @date 2023-05-09
 */
@NoArgsConstructor
@Data
public class WxOrder extends PageObject implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @Excel(name = "订单号")
    @ApiModelProperty(value = "${comment}", required = false)
    private String id;

    /**
     * 微信用户id
     */
    @Excel(name = "用户编号")
    @ApiModelProperty(value = "微信用户id", required = false)
    private Integer userId;

    @Excel(name = "昵称")
    @Transient
    private  String  nickname;

    @Transient
    private  String      realName;

    @Excel(name = "手机号")
    @Transient
    private  String  phone;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间", required = false)
    private Date expireTime;

    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 0待支付,1已支付,2已退款,3关闭支付,4已删除
     */
    @Excel(name="支付状态",readConverterExp="0=待支付,1=已支付,2=已退款,3=关闭支付,4=已删除")
    @ApiModelProperty(value = "0待支付,1已支付,2已退款,3关闭支付,4已删除", required = false)
    private Integer status;

    /**
     * 类型
     *  类型1商家入驻,2购买副牌,3参加活动,4购买会员,5充值金币,6购买团购商品,7优惠券,8商城商品,9购买头衔',
     */
    @Excel(name = "类型",readConverterExp="1=商家入驻,2=购买副牌,3=参加活动,4=购买会员,4=充值金币,6=购买团购商品,7=购买优惠券,8=商城商品,9购买头衔")
    @ApiModelProperty(value = "类型 1商户入驻,2购买副牌,3参加活动", required = false)
    private Integer type;

    @Excel(name = "活动标题")
    @Transient
    private  String    activityName;

    /**
     * 单价分
     */
    //@Excel(name = "单价分")
    @ApiModelProperty(value = "单价分", required = false)
    private BigDecimal price;

    /**
     * 数量
     */
    //@Excel(name = "数量")
    @ApiModelProperty(value = "数量", required = false)
    private Integer number;

    /**
     * 总价分
     */
    @Excel(name = "总价元")
    @ApiModelProperty(value = "总价元", required = false)
    private BigDecimal totalPrice;

    /**
     * 交易流水号
     */
    //@Excel(name = "交易流水号")
    @ApiModelProperty(value = "交易流水号", required = false)
    private String transactionId;

    /**
     * 商户id
     */
    //@Excel(name = "商户id")
    @ApiModelProperty(value = "商户id", required = false)
    private Integer merchantId;

    /**
     * 预支付id
     */
    //@Excel(name = "预支付id")
    @ApiModelProperty(value = "预支付id", required = false)
    private String prepayId;

    private String remark;

    @Transient
    private PayObject payObject;

    private String actObj;

    private String carId;

    @Transient
    private OrderObject orderObject;

    /**
     * 国通的订单流水号
     */
    //@Excel(name = "国通的订单流水号")
    @ApiModelProperty(value = "国通的订单流水号", required = false)
    private String orderNo;

    @ApiModelProperty(value = "快递单号", required = false)
    private String orderNumber;

    @ApiModelProperty(value = "快递单号", required = false)
    private Integer isSend;



    @Transient
    private  Integer  isRefund;

    @Transient
    private  String      address1;





    @Transient
    private String beginTime;

    @Transient
    private String endTime;

    @Transient
    private MyCoupon myCoupon;

    @Transient
    private MyProduct myProduct;

    @Transient
    private String shopName;
}
